﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DTO;
using ModuleDALCore;

namespace DAL
{
	public class PHIEUTHUDAO:DALBase
	{
		public PHIEUTHUDAO()
        {
            this.OpenConnect();
        }
        private DataTable dt;
        private string _SpName;

        public string SpName
        {
            get { return "SPPHIEUTHU"; }
            set { _SpName = value; }
        }
		public PHIEUTHU GETAPT(PHIEUTHU pt)
		{
			dt = new DataTable();
			PHIEUTHU ds = new PHIEUTHU();
			try
			{
				dt = DBManager.Intance.ExecuteDataTable(SpName, ConvertClassToArray.GetParamName(pt, null), ConvertClassToArray.GetValues(pt, 0));
				ds = (PHIEUTHU)ConvertDatatableToList.ConvertToObject<PHIEUTHU>(dt);
			}
			catch { return null; }
			return ds;
		}
		public DataTable getPHIEUTHURPT(PHIEUTHU pt)
		{
			dt = new DataTable();
			try
			{
				dt = DBManager.Intance.ExecuteDataTable(SpName, ConvertClassToArray.GetParamName(pt, null), ConvertClassToArray.GetValues(pt, 4));
			}
			catch { return null; }
			return dt;
		}
	}
}
